 
<div class="container-fluid">

    
        <!-- Page Heading -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">
                   
                    <?php 
                                if ($id !=0)
                                {
                                    echo 'Edit Gender';
                                } else {
                                    echo 'Create Gender';
                                }
                            ?> 
                </h1>
                <ol class="breadcrumb">
                    <li>
                        <i class="fa fa-venus-mars"></i>  <a class="return-breadcrumb" href="<?php echo site_url('manage/gender');?>">Gender</a>
                    </li> 
                    <li>
                        <i class="fa  
                            <?php 
                                if ($id !=0)
                                {
                                    echo 'fa-pencil-square-o';
                                } else {
                                    echo 'fa-plus-square';
                                }
                            ?> ">
                        </i>  
                        <a href="#">
                            <?php 
                                if ($id !=0)
                                {
                                    echo 'Edit';
                                }  else {
                                    echo 'Create';
                                }
                            ?>
                        </a>
                    </li>
                </ol>
            </div>
        </div>
        <!-- /.row -->

        <div class="row">
              <div class="col-lg-6">
                  <form enctype="multipart/form-data" class="form-horizontal" id="form-edit" name="form-edit" method="post" autocomplete="off" action="<?php echo site_url('manage/genderadd');?>"
						data-fv-framework="bootstrap"
						data-fv-icon-valid="glyphicon glyphicon-ok"
						data-fv-icon-invalid="glyphicon glyphicon-remove"
						data-fv-icon-validating="glyphicon glyphicon-refresh">

                                <input type="hidden" name="id" value="<?php echo $id?>"/>                    
				<div class="form-group">
					<label class="col-xs-3 control-label">Full name</label>
					<div class="col-xs-6">
						<input type="text" class="form-control" name="name" placeholder="First name"
							data-fv-row=".col-xs-6"
							data-fv-notempty="true"
							data-fv-notempty-message="The first name is required"
                                                        value="<?php echo $name?>"/>
					</div>
				</div>  
				
				<div class="form-group">
					<label class="col-xs-3 control-label">Note</label>
					<div class="col-xs-6">

						<textarea class="form-control" data-fv-row=".col-xs-6"
							data-fv-notempty="true"
							data-fv-notempty-message="The first name is required"  
							name="note" rows="2" id="note"
                                                        ><?php echo $note ?></textarea>
					</div>
				</div>  
			    
				<div class="form-group">
					<div class="col-xs-9 col-xs-offset-3">
						<button type="submit" class="btn btn-primary" name="signup" value="Sign up">Submit</button>
					</div>
				</div>
			</form>

			</div> 
        </div>

    </div>
<p><tt id="results"></tt></p>
<script type="text/javascript">
    
    $(document).ready(function(){
        
       $('#form-edit').formValidation()
	    .on('success.form.fv', function(e, data) {
			e.preventDefault();
			var $form = $(e.target) 
			$.ajax({
                            url: $form.attr('action'),
                            type: "post",
                            data: $form.serialize(),
                            success: function(data) 
                            {  
                                $('#page-wrapper').html(data);
                                refreshAjax();
                            }
			});
        }); 
        
        
        $(".return-breadcrumb").click(function(){
            $.ajax({
                url:$(this).attr('href'),
                type:"get",
                success:function(data)
                {
                    $('#page-wrapper').html(data);
                    refreshAjax();
                },
                error:function(e)
                {
                    alert(e);
                    return false;
                }
            });
            
            return false;
        });
    });
</script>
 
  